//
//  HuoHandel.m
//  Days
//
//  Created by lanou3g on 16/1/10.
//  Copyright © 2016年 dss. All rights reserved.
//

#import "HuoHandel.h"
#import "DataHandel.h"

static HuoHandel *_handel = nil;

@implementation HuoHandel


+(instancetype)sharedHandel{
    
    return [[self alloc]init];
    
}
+(instancetype)allocWithZone:(struct _NSZone *)zone{
    
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        if (_handel == nil) {
            _handel = [super allocWithZone:zone];
        }
    });
    return _handel;
}

#pragma mark -- 拼接网址
-(NSString *)getUrlStrWithtext:(NSString *)text andType:(int )type{
    
    text = [text stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:text]];
    
    NSString *url = [NSString stringWithFormat:@"http://japi.juhe.cn/charconvert/change.from?text=%@&type=%d&key=be1f634f225d41dfddaab60ce38b1a21",text,type];
    
       
    
    return url;
}




@end
